﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Serialization;

namespace Aleator.Core
{
    public partial class MelodyCluster : ICloneable
    {
        #region Members

        private int m_location;
        private int m_measure;
        private Dictionary<int, string> m_beatDictionary; 

        #endregion

        #region Properties

        /// <summary>
        /// Starting point for the cluster
        /// </summary>
        public int Location
        {
            get
            {
                return m_location;
            }
            set
            {
                m_location = value;
            }
        }

        /// <summary>
        /// Starting measure of the cluster
        /// </summary>
        public int Measure
        {
            get
            {
                return m_measure;
            }
            set
            {
                m_measure = value;
            }
        }

        /// <summary>
        /// Holds beat/note assocatiations
        /// </summary>
        public Dictionary<int, string> BeatDictionary
        {
            get
            {
                return m_beatDictionary;
            }
            set
            {
                m_beatDictionary = value;
            }
        }
        #endregion

        #region Methods

        /// <summary>
        /// Clone this melody
        /// </summary>
        /// <returns></returns>
        public object Clone()
        {
            MelodyCluster newMelodyCluster = (MelodyCluster)this.MemberwiseClone();

            return newMelodyCluster;
        }

        #endregion
    }
}
